package com.xmhmyh.generalframework.common.aliyunOss.utils;

import com.xmhmyh.generalframework.framework.config.AliOssConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ImgUtils {

    @Autowired
    AliOssConfig aliOssConfig;

    public String genImgPath(String path, String style) {
        return aliOssConfig.getHost() + "/" + path + "?x-oss-process=style/" + style;
    }

    public String genFilePath(String path) {
        return aliOssConfig.getHost() + "/" + path;
    }
}
